<!DOCTYPE html>
<html class="x-admin-sm">

    <head>
        <meta charset="UTF-8">
        <title>文本消息</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!--        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />-->
        <link rel="stylesheet" href="./css/font.css">
        <link rel="stylesheet" href="./css/xadmin.css">
        <script src="./lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="./js/xadmin.js"></script>
        <script type="text/javascript" src="./js/jquery.min.js"></script>
        <script type="text/javascript" src="./data/sensor.js"></script>
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->

    </head>

    <body>
        <div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="">首页</a>
                <a href="">文本消息</a>
                <a>
                    <cite>文本消息</cite></a>
            </span>
            <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
                <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
            </a>
        </div>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body ">
                           <textarea id="input_text" class="layui-textarea">

                           </textarea>
                            <button class="layui-btn layui-btn-sm" style="float: right;" onclick="saveRs()">
                                保存
                            </button>
                        </div>
                        <div class="layui-card-body ">
                            字号：<select  id="font_size">
                                        <option value="6">6</option>
                                        <option selected="selected" value="8">8</option>
                                        <option value="10">10</option>
                                        <option value="12">12</option>
                                        <option value="14">14</option>
                                        <option value="16">16</option>
                                        <option value="18">18</option>
                                        <option value="20">20</option>
                                        <option value="22">22</option>
                                        <option value="24">24</option>
                                        <option value="26">26</option>
                                        <option value="28">28</option>
                                        <option value="30">30</option>
                                        <option value="32">32</option>
                                        <option value="36">36</option>
                                        <option value="40">40</option>
                                        <option value="48">48</option>
                                        <option value="72">72</option>
                        </select>
                            字体颜色：<select  id="font_color">
                                            <option value="##FF000000">白色</option>
                                            <option value="##FF000000">白色</option>
                                     </select>
                            背景颜色：<select  id="bg_color">
                                            <option value="##FF000000">白色</option>
                                            <option value="##FF000000">白色</option>
                                     </select>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </body>


    <script type="text/javascript">
             function saveRs() {
                 let params={"resourcesName":"文本",
                     "resourcesType":1,
                     "txtContent":$("#input_text").val(),
                     "resourcesUrl":""
                 };
                 let result=sensorServer.addContentResources(params);
                 if(result==1){
                     layer.msg("添加成功！");
                 }else{
                     layer.msg("操作失败！");
                 }
             }
    </script>

</html>
